package com.lottery.im.api.result.entity;

import android.content.Context;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.lottery.im.MyApplication;
import com.lottery.im.constant.SpKeyConstant;
import com.lottery.im.util.SPUtils;

public class UserInfo {

  /**
   * phone : 15880242719
   * pwdInfo : 0  是否设置过验证密码  0否 1是
   * thirdUserName : lian
   * thirdAccId : 124673
   * accountPwd :
   * rakeOff : 0.4
   * userType : 80
   * qqServiceName : 760264
   * amount : 0
   * lastLoginIp : 27.154.170.194
   * QQ :
   * userId : 15880242719
   * userName : lian
   * createDate : 20180905142926
   * outCount : 0
   * surplus : 0
   * userPic : null
   * lastLoginDate : 20180905142926
   * outMaxCount : 5
   * isTest : 0
   * endLoginIp : 27.154.170.194
   * qqFeedBackName : 553701
   * endLoginDate : 20180905144310
   * fozenAmount : 0
   * thirdToken : eJxlz01vgkAUheE9v4KwbdPeGT6U7owaGautApq4IsgMeEuLBAYFm-53I23TSbp*3uTkfGq6rhvhIniIk*TYFDKSXSkM-Uk3wLj-w7JEHsUyMiv*D0VbYiWiOJWi6pHYtk0B1Aa5KCSm*FtQyxmYitc8j-qRb7YACLgODNQEsx6X092YrSdkjXZW*Xmz8mez1bzx7uaHZ7p8mT5O2ozTHXtFFooNBPWZHUZsxKxL61t7DLepl9dpt-Fyvn0n1jg*78NFB3h6C9KS5IkyKfFD-DwyHUKHrjNU9CSqGo9FH1AgNqHgwu229qVdAZIQXMw_
   * amountCanOut : 0
   * email :
   * isSetPayPwd : N  是否设置过资金密码
   * Id :
   * realName :
   */

  private String phone;
  private String pwdInfo;
  private String thirdUserName;
  private String thirdAccId;
  private String accountPwd;
  private String rakeOff;
  private String userType;
  private String qqServiceName;
  private double amount;
  private String lastLoginIp;
  private String QQ;
  private String userId;
  private String userName;
  private String createDate;
  private String outCount;
  private String surplus;
  private String userPic;
  private String lastLoginDate;
  private String outMaxCount;
  private String isTest;
  private String endLoginIp;
  private String qqFeedBackName;
  private String endLoginDate;
  private String fozenAmount;
  private String thirdToken;
  private String amountCanOut;
  private String email;
  private String isSetPayPwd;
  private String Id;
  private String realName;

  public String getPhone() {
    return TextUtils.isEmpty(phone) ? "" : phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getPwdInfo() {
    return TextUtils.isEmpty(pwdInfo) ? "" : pwdInfo;
  }

  public void setPwdInfo(String pwdInfo) {
    this.pwdInfo = pwdInfo;
  }

  public String getThirdUserName() {
    return TextUtils.isEmpty(thirdUserName) ? "" : thirdUserName;
  }

  public void setThirdUserName(String thirdUserName) {
    this.thirdUserName = thirdUserName;
  }

  public String getThirdAccId() {
    return TextUtils.isEmpty(thirdAccId) ? "" : thirdAccId;
  }

  public void setThirdAccId(String thirdAccId) {
    this.thirdAccId = thirdAccId;
  }

  public String getAccountPwd() {
    return TextUtils.isEmpty(accountPwd) ? "" : accountPwd;
  }

  public void setAccountPwd(String accountPwd) {
    this.accountPwd = accountPwd;
  }

  public String getRakeOff() {
    return TextUtils.isEmpty(rakeOff) ? "" : rakeOff;
  }

  public void setRakeOff(String rakeOff) {
    this.rakeOff = rakeOff;
  }

  public String getUserType() {
    return TextUtils.isEmpty(userType) ? "" : userType;
  }

  public void setUserType(String userType) {
    this.userType = userType;
  }

  public String getQqServiceName() {
    return TextUtils.isEmpty(qqServiceName) ? "" : qqServiceName;
  }

  public void setQqServiceName(String qqServiceName) {
    this.qqServiceName = qqServiceName;
  }

  public double getAmount() {
    return amount;
  }

  public void setAmount(double amount) {
    this.amount = amount;
  }

  public String getLastLoginIp() {
    return TextUtils.isEmpty(lastLoginIp) ? "" : lastLoginIp;
  }

  public void setLastLoginIp(String lastLoginIp) {
    this.lastLoginIp = lastLoginIp;
  }

  public String getQQ() {
    return TextUtils.isEmpty(QQ) ? "" : QQ;
  }

  public void setQQ(String QQ) {
    this.QQ = QQ;
  }

  public String getUserId() {
    return TextUtils.isEmpty(userId) ? "" : userId;
  }

  public void setUserId(String userId) {
    this.userId = userId;
  }

  public String getUserName() {
    return TextUtils.isEmpty(userName) ? "" : userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getCreateDate() {
    return TextUtils.isEmpty(createDate) ? "" : createDate;
  }

  public void setCreateDate(String createDate) {
    this.createDate = createDate;
  }

  public String getOutCount() {
    return TextUtils.isEmpty(outCount) ? "" : outCount;
  }

  public void setOutCount(String outCount) {
    this.outCount = outCount;
  }

  public String getSurplus() {
    return TextUtils.isEmpty(surplus) ? "" : surplus;
  }

  public void setSurplus(String surplus) {
    this.surplus = surplus;
  }

  public String getUserPic() {
    return TextUtils.isEmpty(userPic) ? "" : userPic;
  }

  public void setUserPic(String userPic) {
    this.userPic = userPic;
  }

  public String getLastLoginDate() {
    return TextUtils.isEmpty(lastLoginDate) ? "" : lastLoginDate;
  }

  public void setLastLoginDate(String lastLoginDate) {
    this.lastLoginDate = lastLoginDate;
  }

  public String getOutMaxCount() {
    return TextUtils.isEmpty(outMaxCount) ? "" : outMaxCount;
  }

  public void setOutMaxCount(String outMaxCount) {
    this.outMaxCount = outMaxCount;
  }

  public String getIsTest() {
    return TextUtils.isEmpty(isTest) ? "" : isTest;
  }

  public void setIsTest(String isTest) {
    this.isTest = isTest;
  }

  public String getEndLoginIp() {
    return TextUtils.isEmpty(endLoginIp) ? "" : endLoginIp;
  }

  public void setEndLoginIp(String endLoginIp) {
    this.endLoginIp = endLoginIp;
  }

  public String getQqFeedBackName() {
    return TextUtils.isEmpty(qqFeedBackName) ? "" : qqFeedBackName;
  }

  public void setQqFeedBackName(String qqFeedBackName) {
    this.qqFeedBackName = qqFeedBackName;
  }

  public String getEndLoginDate() {
    return TextUtils.isEmpty(endLoginDate) ? "" : endLoginDate;
  }

  public void setEndLoginDate(String endLoginDate) {
    this.endLoginDate = endLoginDate;
  }

  public String getFozenAmount() {
    return TextUtils.isEmpty(fozenAmount) ? "" : fozenAmount;
  }

  public void setFozenAmount(String fozenAmount) {
    this.fozenAmount = fozenAmount;
  }

  public String getThirdToken() {
    return TextUtils.isEmpty(thirdToken) ? "" : thirdToken;
  }

  public void setThirdToken(String thirdToken) {
    this.thirdToken = thirdToken;
  }

  public String getAmountCanOut() {
    return TextUtils.isEmpty(amountCanOut) ? "" : amountCanOut;
  }

  public void setAmountCanOut(String amountCanOut) {
    this.amountCanOut = amountCanOut;
  }

  public String getEmail() {
    return TextUtils.isEmpty(email) ? "" : email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getIsSetPayPwd() {
    return TextUtils.isEmpty(isSetPayPwd) ? "" : isSetPayPwd;
  }

  public void setIsSetPayPwd(String isSetPayPwd) {
    this.isSetPayPwd = isSetPayPwd;
  }

  public String getId() {
    return TextUtils.isEmpty(Id) ? "" : Id;
  }

  public void setId(String id) {
    Id = id;
  }

  public String getRealName() {
    return TextUtils.isEmpty(realName) ? "" : realName;
  }

  public void setRealName(String realName) {
    this.realName = realName;
  }

  /**
   * 刷新保存的userinfo
   */
  public static void refreshInfo(Context context, UserInfo info) {
    MyApplication.getInstance().setUserInfo(info);
    SPUtils.put(context, SpKeyConstant.USERINFO_KEY,
        new Gson().toJson(info));
  }
}
